Skip to content

Add NodeMaxAllocations to client configuration #25785

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 22, 2025
Merged

Conversation

tehut
Copy link
Contributor

@tehut tehut commented Apr 30, 2025

Description

This PR introduces the concept of maximum allocations to the client via the client configuration file. This includes updates to the nomad node status command to add an Alloc Count column to the Allocated Resources section of the single node view. If node_max_alloc is defined it will be included as the denominator, otherwise we'll just report the count as a whole number.

Testing & Reproduction steps

The below screenshots were generated by running a single agent dev cluster and passing it the minimal configuration in command/agent/test-resources/client_with_max_allocs.hcl.

Single node status output when client.node_max_allocs is not set

allocs_not_set

Single node status output when client.node_max_allocs is set

allocs_set

Links

Github Issue #12783

Contributor Checklist

  • Changelog Entry If this PR changes user-facing behavior, please generate and add a
    changelog entry using the make cl command.
  • Testing Please add tests to cover any new functionality or to demonstrate bug fixes and
    ensure regressions will be caught.
  • Documentation If the change impacts user-facing functionality such as the CLI, API, UI,
    and job configuration, please update the Nomad website documentation to reflect this. Refer to
    the website README for docs guidelines. Please also consider whether the
    change requires notes within the upgrade guide.

Reviewer Checklist

  • Backport Labels Please add the correct backport labels as described by the internal
    backporting document.
  • Commit Type Ensure the correct merge method is selected which should be "squash and merge"
    in the majority of situations. The main exceptions are long-lived feature branches or merges where
    history should be preserved.
  • Enterprise PRs If this is an enterprise only PR, please add any required changelog entry
    within the public repository.

@tehut tehut marked this pull request as draft May 16, 2025 02:29
@tgross tgross self-requested a review May 16, 2025 13:13
Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! :shipit:

@tehut tehut merged commit 55523ec into main May 22, 2025
48 checks passed
@tehut tehut deleted the f-max-allocations/nmd-617 branch May 22, 2025 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants